<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

    <title>简历管理</title>

    <link href="../../css/mine.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript" src="/js/jquery.js"></script>
</head>
<body>
<style>
    .tr_color {
        background-color: #9F88FF
    }
</style>
<div class="div_head">
            <span>
                <span style="float: left;">当前位置是：招聘管理-》简历管理</span>
                <span style="float: right; margin-right: 8px; font-weight: bold;">
                    <a style="text-decoration: none;" href="/zhaopin/demo2/checkDept">【添加】</a>
                </span>
            </span>
</div>
<div></div>
<div class="div_search">
            <span>
                <form action="/zhaopin/demo2/checkResume" method="post">
					姓名: 
					<input type="text" name="username" value="${username}" size="10px"/>
					 应聘职位: 
					<input type="text" name="roleName" value="${roleName}" size="20px"/>
					工作经验: 
					<input type="text" name="workExp" value="${workExp}" size="10px"/>
					登记日期: 
					<input type="text" name="registerDate" value="${registerDate}" size="20px"/>
                    <input value="查询" type="submit"/>
					
                </form>
            </span>
</div>
<div style="font-size: 13px; margin: 10px 5px;">
    <table class="table_a" border="1" width="100%">
        <tbody>
        <tr style="font-weight: bold;">
            <td width="30px;">姓名</td>
            <td width="30px;">性别</td>
            <td width="70px;">毕业院校</td>
            <td width="30px">学历</td>
            <td width="30px">专业</td>
            <td width="100px;">应聘职位</td>
            <td width="40px;">工作经验</td>
            <td width="70px;">登记日期</td>

            <td align="center" width="100px;">操作</td>
        </tr>
        <c:forEach items="${pageInfo.list}" var="resume">
        <tr id="product1">
            <td><a href="view.jsp">${resume.username}</a></td>
            <td>${resume.gender}</td>
            <td>${resume.school}</td>
            <td>${resume.diploma}</td>
            <td>${resume.major}</td>
            <td>${resume.role.rname}</td>
            <td>${resume.workExp}</td>
            <td>${resume.registerDate}</td>
            <td>
                <a href="/zhaopin/demo2/checkOneResume?id=${resume.id}">修改</a>
                <a href="javascript:void(0)" onclick="del(${resume.id},this)">删除</a>
                <select name="resumeState">
                    <option>存档</option>
                    <option>推荐面试</option>
                    <option>推荐二面</option>
                    <option>推荐三面</option>
                    <option>建议录用</option>
                    <option>录用</option>
                    <option>删除</option>
                </select>
            </td>
        </tr>
        </c:forEach>
        <tr>
            <td colspan="20" style="text-align: center;">
                <a style="text-decoration: none;"
                   href="/zhaopin/demo2/checkResume?username=${username}&roleName=${roleName}&workExp=${workExp}&registerDate=${registerDate}">
                    首页
                </a>
                <a style="text-decoration: none;"
                   href="/zhaopin/demo2/checkResume?page=${pageInfo.prePage==0?1:pageInfo.prePage}&username=${username}&roleName=${roleName}&workExp=${workExp}&registerDate=${registerDate}">
                    上一页
                </a>
                <c:forEach var="s" begin="1" end="${pageInfo.pages}">
                    <a style="text-decoration: none;"
                       href="/zhaopin/demo2/checkResume?page=${s}&username=${username}&roleName=${roleName}&workExp=${workExp}&registerDate=${registerDate}">
                            ${s}
                    </a>
                </c:forEach>
                <a style="text-decoration: none;"
                   href="/zhaopin/demo2/checkResume?page=${pageInfo.nextPage==0?pageInfo.pages:pageInfo.nextPage}&username=${username}&roleName=${roleName}&workExp=${workExp}&registerDate=${registerDate}">
                    下一页
                </a>
                <a style="text-decoration: none;"
                   href="/zhaopin/demo2/checkResume?page=${pageInfo.pages}&username=${username}&roleName=${roleName}&workExp=${workExp}&registerDate=${registerDate}">
                    尾页
                </a>
                共${pageInfo.total}条 第${pageInfo.pageNum}页/共${pageInfo.pages}页
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
<script type="text/javascript">
    function del(id, obj) {
        if(confirm("确定删除吗？")){
            $.getJSON(
                "/zhaopin/demo2/deleteResume",
                {id:id},
                function (result) {
                    if(result.code==0){
                        $(obj).parent().parent().remove()
                    }else{
                        alert("result.msg")
                    }
                }
            )
        }
    }
</script>
</html>